# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=py3-bracex
_pkgname=bracex
pkgver=2.4
pkgrel=1
pkgdesc="brace expanding library (à la Bash) for Python"
url="https://facelessuser.github.io/bracex/"
arch="noarch"
license="MIT"
depends="py3-hatchling"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" .dist/*.whl
}

sha512sums="
14e520aad81b65df5047374b1920c7202bc62d4524fba4ae82ca7e92e18ae4e0f5d6a184fd772da0cafc3e891f45bab53ad31f6b444d914c3469969b33fa1a28  bracex-2.4.tar.gz
"
